﻿using System;
using System.Runtime.Serialization;

class Student
{
    public string FirstName { get; private set; }
    public string LastName { get; private set; }
    public uint FacultyNumber { get; private set; }

    public Student(string firstName, string lastName, uint facultyNumber)
    {
        this.FirstName = firstName;
        this.LastName = lastName;
        this.FacultyNumber = facultyNumber;
    }

    public override string ToString()
    {
        return FirstName + ", " + LastName + ", " + FacultyNumber;
    }

    public static Student Parse(string str)
    {
        string[] strings = str.Split(new char []{' ',','},StringSplitOptions.RemoveEmptyEntries);
        return new Student(strings[0], strings[1], uint.Parse(strings[2]));
    }

    //public void GetObjectData(SerializationInfo info, StreamingContext context)
    //{
    //    info.AddValue("FirstName", FirstName);
    //    info.AddValue("LastName", LastName);
    //    info.AddValue("FacultyNumber", FacultyNumber);
    //}

}
